﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data;
using DataLib.Accounts.Bus;

namespace Ewts.Storage
{
    public partial class LoadNumList : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!Page.IsPostBack)
            {
                if (Session["UserInfo"] != null)
                {
             
                     // 处理地
                    string city = "";



                    User curUser = new DataLib.Accounts.Bus.User();
                    curUser = (User)Session["UserInfo"];
                    if (curUser.UserType != "AD")
                    {
                        city = curUser.CompanyCity;
                    }
                    bindData(city);
                }
                else
                {
                    Response.Redirect("/accounts/login.aspx");
                }

            }
        }
    
        public void bindData(string city)
        {
            DataLib.BLL.Cjo bll = new DataLib.BLL.Cjo();

            reptCustomer.DataSource = bll.GetLoadnumList(city); ;
                reptCustomer.DataBind();
           

        }

      

             /// <summary>
        /// 取得当前状态的中文描述
        /// </summary>
        /// <param name="loadid"></param>
        /// <returns></returns>
        protected string GetStatus(string cjostatus)
        {
            string statusname = "";
            switch (cjostatus)
                    {
                        case "1":
                            statusname = "待派车";
                            break;
                        case "2":
                            statusname = "待称重";
                            break;
                        case "3":
                            statusname = "待授权";
                            break;
                        case "4":
                            statusname = "待拆解";
                            break;
                        case "5":
                            statusname = "拆解中";
                            break;
                        case "-4":
                            statusname = "拆解申请审批中";
                            break;
                        case "-9":
                            statusname = "作废";
                            break;
                        default:
                            break;
                    }
          

            return statusname;

        }

    


    }
}